cmake_minimum_required(VERSION 3.10)
project(lib_test)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# set(ICONV_LIBRARY [=[D:\libraries\C++\libiconv-1.18\bin\libiconv-2.dll]=])
# set(ICONV_INCLUDE_DIR [=[D:\libraries\C++\libiconv-1.18\include]=])
# find_package(iconv REQUIRED)

# if(NOT iconv_FOUND)
#     message(FATAL_ERROR "iconv not found")
# endif()

set(uchardet_DIR [=[D:\libraries\C++\uchardet\lib\cmake\uchardet]=])
link_directories([=[D:\libraries\C++\uchardet\lib\]=])

include_directories([=[D:\libraries\C++\uchardet\include\]=])
find_package(uchardet REQUIRED)

# if(NOT uchardet_FOUND)
#     message(FATAL_ERROR "iconv not found")
# endif()

add_executable(lx_icon lx_icon.cpp)
target_link_libraries(lx_icon iconv uchardet)
set_runtime_name(lx_icon)
set_out_path(lx_icon)